package com.siam.package_rider.feign;

import com.siam.package_common.entity.BasicResult;
import com.siam.package_rider.entity.TbRider;
import com.siam.package_rider.model.param.TbRiderParam;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;

@FeignClient(value = "rider-siam")
public interface RiderFeignApi {

//    @PostMapping(value = "/api/rider/countByExample")
//    BasicResult countByExample(@RequestBody TbRiderParam param);

    @PostMapping(value = "/api/rider/insertSelective")
    BasicResult insertSelective(@RequestBody TbRider record);

//    @PostMapping(value = "/api/rider/selectByExample")
//    BasicResult<List<TbRider>> selectByExample(@RequestBody TbRiderParam param);

    @PostMapping(value = "/api/rider/selectByPrimaryKey")
    BasicResult<TbRider> selectByPrimaryKey(@RequestParam("id") long id);

    @PostMapping(value = "/api/rider/updateByPrimaryKeySelective")
    BasicResult updateByPrimaryKeySelective(@RequestBody TbRider record);

    @PostMapping(value = "/api/rider/selectByMobile")
    BasicResult selectByMobile(@RequestParam("mobile") String mobile);

    @PostMapping(value = "/api/rider/selectByMemberId")
    BasicResult<TbRider> selectByMemberId(@RequestParam("memberId") Integer memberId);
}